package com.hmall.order.task;

import com.hmall.order.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class OrderTimeoutTask {

    @Autowired
    private IOrderService orderService;

    @Scheduled(cron = "0 * * * * ?")
    public void closeOrder(){
        orderService.closeTimeoutOrder();
    }
}
